package com.principle.lsp;

/**
 * @author yangguanzan
 * @date 3/10/22
 * @description
 */
public class Soldier {

    private AbstractGun gun;

    public void setGun(AbstractGun gun) {
        this.gun = gun;
    }

    public void killEnemy() {
        System.out.println("杀敌：");
        this.gun.shoot();
    }
}
